package com.example.javabasic.thread.classtwo.singleton.demo1;
//饿汉式单例

/**
 * 系统启动加载,  饿汉不能懒加载
 */
public class SingleOne {
    private static final SingleOne instance = new SingleOne();
    //私有构造
    private SingleOne(){

    }
    //get 方法  获取单例
    public static SingleOne getInstance(){
        return instance;
    }
}
